firstNotNull

fun <T : Any> Array<out T>.firstNotNull(): T(source)

Returns the first non-null element or null otherwise.